1. Field of the Invention
This invention relates generally to disk caching, and more particularly to dynamic cache allocation in a solid stage drive environment.
2. Description of the Related Art
Today, mobile computing allows individuals the freedom to utilize the processing power of computers anywhere it is needed. Using mobile computing devices, such as laptops and notebooks, users are able to take their projects with them whenever they leave their normal computing environment such as their home or office. To enable such freedom, power consumption by these mobile computing devices must be reduced to enable longer operating times away from permanent power sources.
One solution for power conservation is the use of various power states based on computing use. For example, when a system is idle for a predetermined period of time, the system can enter a standby, or sleep power state. In the sleep power state, the system turns off power to peripherals, such as the keyboard, mouse and the hard drive. However, to save the current state of the computing device, power is still supplied to the RAM, enabling the system to hold the current state in memory. Upon an event indicating the end of the idle period, such as a keyboard use or mouse use, the system resumes from the sleep power state, supplying power back to peripherals and resuming normal operation.
However, although much reduced, the sleep power state still consumes power in order to save the system state in RAM. To further save power, a system can enter a hibernation power state, wherein the system state is saved to non-volatile memory. When entering the hibernation state, the contents of the RAM is saved to non-volatile memory and power is turned off in the entire system. Upon resuming, the RAM contents is loaded back into RAM from the non-volatile memory and normal operation continues.
Although the hibernation power state saves power, resuming from the hibernation state requires an increased period of time over resuming from a sleep power state, particularly when the non-volatile memory used to save the system state is a hard disk drive. To address this issue, Intel Fast Flash Standby (iFFS) has been developed. iFFS saves the system state on a solid state drive (SSD) and further introduces a sleep state prior to entering an iFFS-hibernation state. Together, these improvements decrease the time required to resume after the system has been idle and power savings modes have been entered.
FIG. 1 is a block diagram showing a prior art iFFS based computer system 100. The iFFS based computer system includes a central processing unit (CPU) in communication with system RAM 104 and an iFFS non-volatile memory 106. The iFFS non-volatile memory 106 is an SSD that has the same storage capacity as the RAM 104 and is dedicated to storage of the RAM contents upon hibernation. When the system 100 is idle for a predetermined period of time, the system enters a sleep power mode, wherein power is still supplied to the RAM 104, however all other peripherals are turned off.
After a predetermined period of time, if the system 100 remains idle it enters an iFFS-hibernation power state. When the system 100 enters the iFFS-hibernation power state, the contents of the RAM 104 is written to the iFFS non-volatile memory 106 and power is turned off in the entire system 100. Later, upon resume, the RAM data stored in the iFFS non-volatile memory 106 is loaded back into the RAM 104 and the system 100 resumes normal operation. Since the iFFS non-volatile memory 106 is an SSD, the period of time need to complete resume is greatly decreased.
Caching has long been used in storage environments to enhance the performance of slower storage devices, such as disk drives. In caching, a smaller and faster storage medium is utilized to temporarily store and retrieve frequently used data, while the larger and typically slower mass storage medium is used for long term storage of data. However, using the SSD of the iFFS non-volatile memory can lead to data loss for the cache and/or wasted SSD storage.
In view of the foregoing, there is a need for systems and methods that allow SSD based caching in an iFFS environment. The methods should allow full iFFS functionality without wasting expensive SSD memory. Moreover, the methods should provide a means to fully utilized memory for caching, yet account for any data loss as a result of iFFS based hibernation use.